<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:a="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <h:form id="isemir" styleClass="edit">
        <rich:panel>
            <f:facet name="header">#{isemirHome.managed ? 'Edit' : 'Add'} Isemir</f:facet>

			<rich:layout>
              	<rich:layoutPanel position="left">

		            <s:decorate id="isemirnoField" template="layout/edit.xhtml">
		                <ui:define name="label">Isemirno</ui:define>
		                <h:inputText id="isemirno" required="true" value="#{isemirHome.instance.isemirno}"/>
		            </s:decorate>
		
		            <s:decorate id="isemirtarihiField" template="layout/edit.xhtml">
		                <ui:define name="label">Isemirtarihi</ui:define>
		                <rich:calendar id="isemirtarihi" required="true" value="#{isemirHome.instance.isemirtarihi}" datePattern="MM/dd/yyyy" />
		            </s:decorate>

<!--		            <s:decorate id="extendedDataTableField" template="layout/edit.xhtml">-->
<!--		                <ui:define name="label">Ürün</ui:define>-->
<!--		                	<h:panelGrid columns="3">-->
<!--				                <h:outputLink value="#" id="link">Ürün Seç-->
<!--							        <rich:componentControl for="popup" attachTo="link" operation="show" event="onclick"/>-->
<!--							    </h:outputLink>-->
<!--							    <h:outputLabel value="  "/> -->
<!--			                	<h:outputLabel value="#{isemirHome.instance.urun==null ? 'Ürün Seç' : isemirHome.instance.urun.adi}   #{isemirHome.instance.urun==null ? ' ' : isemirHome.instance.urun.ambalaj}" />-->
<!--			                </h:panelGrid>-->
<!--		            </s:decorate>-->

		             <s:decorate id="extendedDataTableField" template="layout/edit.xhtml">
		                <ui:define name="label">Ürün</ui:define>
		                	<h:panelGrid columns="3">
								<h:panelGroup>
									<h:graphicImage id="link" value="/img/selection.png" styleClass="hidelink"/>
                					<rich:componentControl for="popup" attachTo="link" operation="show" event="onclick"/>
							    </h:panelGroup>
					     	
					     		<h:outputLabel value="   " /> 
					     			
			                	<h:outputLabel value="#{isemirHome.instance.urun==null ? 'Ürün Seç' : isemirHome.instance.urun.adi}   #{isemirHome.instance.urun==null ? ' ' : isemirHome.instance.urun.ambalaj}" />
			                </h:panelGrid>
		            </s:decorate>
		
		            <s:decorate id="kalipekiField" template="layout/edit.xhtml">
		                <ui:define name="label">Kalipeki</ui:define>
		                <h:inputText id="kalipeki" value="#{isemirHome.instance.kalipeki}"/>
		            </s:decorate>
		
		            <s:decorate id="planlananadetField" template="layout/edit.xhtml">
		                <ui:define name="label">Planlananadet</ui:define>
		                <h:inputText id="planlananadet" required="true" value="#{isemirHome.instance.planlananadet}">
		                    <a:support event="onblur" reRender="planlananadetField" bypassUpdates="true" ajaxSingle="true"/>
		                </h:inputText>
		            </s:decorate>
				            
		            <s:decorate id="aypaciklamaField" template="layout/edit.xhtml">
		                <ui:define name="label">Aypaciklama</ui:define>
		                <h:inputTextarea id="aypaciklama" cols="80" rows="4" value="#{isemirHome.instance.aypaciklama}"/>
		            </s:decorate>
		
		            <s:decorate id="musterimarkalamasiField" template="layout/edit.xhtml">
		                <ui:define name="label">Musteri markalamasi</ui:define>
		                <h:inputTextarea id="musterimarkalamasi" cols="80" rows="4" value="#{isemirHome.instance.musterimarkalamasi}"/>
		            </s:decorate>
		
		            <s:decorate id="formnoField" template="layout/edit.xhtml">
		                <ui:define name="label">Formno</ui:define>
		                <h:inputText id="formno" value="#{isemirHome.instance.formno}"/>
		            </s:decorate>
		    	</rich:layoutPanel>

		    	<rich:layoutPanel position="center">

					<s:decorate id="isletmeField" template="layout/edit.xhtml">
		                <ui:define name="label">İşletme</ui:define>
				      	
				      	<h:selectOneMenu width="250" value="#{isemirHome.instance.isletme}" required="true">
							<s:selectItems value="#{isletmeList.resultList}" var="isletme" label="#{isletme.kod} - #{isletme.ad}" noSelectionLabel="Seçim Yapınız!"  />
							<s:convertEntity />
						</h:selectOneMenu>

<!--						<rich:comboBox>-->
<!--							<s:selectItems  value="#{isletmeList.resultList}" var="isletme" itemLabel="#{isletme.kod}" itemValue="#{isletme.kod} - #{isletme.ad}"/>-->
<!--							<s:convertEntity />-->
<!--						</rich:comboBox>-->
						
					</s:decorate>
			
		            <s:decorate id="siparisnoField" template="layout/edit.xhtml">
		                <ui:define name="label">Siparisno</ui:define>
		                <h:inputText id="siparisno" required="true" value="#{isemirHome.instance.siparisno}"/>
		            </s:decorate>

					<s:decorate id="musteriField" template="layout/edit.xhtml">
		                <ui:define name="label">Müşteri</ui:define>
				      	<h:selectOneMenu  width="250" value="#{isemirHome.instance.musteri}" required="true">
							<s:selectItems value="#{musteriList.resultList}" var="musteri" label="#{musteri.kod} - #{musteri.ad}" noSelectionLabel="Seçim Yapınız!"  />
							<s:convertEntity />
						</h:selectOneMenu>
					</s:decorate>
					
					<s:decorate id="ulkeField" template="layout/edit.xhtml">
		                <ui:define name="label">Ülke</ui:define>
				      	<h:selectOneMenu  width="250" value="#{isemirHome.instance.ulke}" required="true">
							<s:selectItems value="#{ulkeList.resultList}" var="ulke" label="#{ulke.kod} - #{ulke.ad}" noSelectionLabel="Seçim Yapınız!"  />
							<s:convertEntity />
						</h:selectOneMenu>
					</s:decorate>
		    	
		    		<s:decorate id="termintarihiField" template="layout/edit.xhtml">
		                <ui:define name="label">Termintarihi</ui:define>
		                <rich:calendar id="termintarihi" required="true" value="#{isemirHome.instance.termintarihi}" datePattern="MM/dd/yyyy" />
		            </s:decorate>
		    	
		    	    <s:decorate id="upkaciklamaField" template="layout/edit.xhtml">
		                <ui:define name="label">Upkaciklama</ui:define>
		                <h:inputTextarea id="upkaciklama" cols="80" rows="4" value="#{isemirHome.instance.upkaciklama}"/>
		            </s:decorate>

		            <s:decorate id="uretimenotlarField" template="layout/edit.xhtml">
		                <ui:define name="label">Uretimenotlar</ui:define>
		                <h:inputTextarea id="uretimenotlar" cols="80" rows="4" value="#{isemirHome.instance.uretimenotlar}"/>
		            </s:decorate>
		    	
		    	</rich:layoutPanel>
		    </rich:layout>


            <div style="clear:both">
                <span class="required">*</span>
                required fields
            </div>

        </rich:panel>

        <div class="actionButtons">

            <h:commandButton id="save"
                          value="Save"
                         action="#{isemirHome.persist}"
                       disabled="#{!isemirHome.wired}"
                       rendered="#{!isemirHome.managed}"/>

            <h:commandButton id="update"
                          value="Save"
                         action="#{isemirHome.update}"
                         disabled="#{!isemirHome.wired}"
                       rendered="#{isemirHome.managed}"/>

            <h:commandButton id="delete"
                          value="Delete"
                         action="#{isemirHome.remove}"
                      immediate="true"
                       rendered="#{isemirHome.managed}"/>

            <s:button id="cancelEdit"
                   value="Cancel"
             propagation="end"
                    view="/Isemir.xhtml"
                rendered="#{isemirHome.managed}"/>

            <s:button id="cancelAdd"
                   value="Cancel"
             propagation="end"
                    view="/#{empty isemirFrom ? 'IsemirList' : isemirFrom}.xhtml"
                rendered="#{!isemirHome.managed}"/>

        </div>
    </h:form>

<rich:tabPanel switchType="ajax">

    <rich:tab label="Firma **" labelClass="required" rendered="#{isemirHome.instance.firma == null || authenticator.isAdmin()}">
    <div class="association" id="firmaParent">

        <h:outputText value="There is no firma associated with this isemir."
                   rendered="#{isemirHome.instance.firma == null}"/>

        <rich:dataTable var="_firma"
                   value="#{isemirHome.instance.firma}"
                rendered="#{isemirHome.instance.firma != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="firmaTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_firma.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Ad</f:facet>
                <h:outputText value="#{_firma.ad}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Adres</f:facet>
                <h:outputText value="#{_firma.adres}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Eposta</f:facet>
                <h:outputText value="#{_firma.eposta}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Kod</f:facet>
                <h:outputText value="#{_firma.kod}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Mersisno</f:facet>
                <h:outputText value="#{_firma.mersisno}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Telefon</f:facet>
                <h:outputText value="#{_firma.telefon}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Vergino</f:facet>
                <h:outputText value="#{_firma.vergino}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Webadresi</f:facet>
                <h:outputText value="#{_firma.webadresi}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{isemirHome.instance.firma != null ? 'changeParent' : 'selectParent'}" value="#{isemirHome.instance.firma != null ? 'Change' : 'Select'} firma"
                       view="/FirmaList.xhtml">
                <f:param name="from" value="IsemirEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>

    <rich:tab label="Isemirbarkods">
        <h:form styleClass="association" id="isemirbarkodsChildren">

            <h:outputText value="There are no isemirbarkods associated with this isemir."
                       rendered="#{empty isemirHome.isemirbarkods}"/>

            <rich:dataTable value="#{isemirHome.isemirbarkods}"
                           var="_isemirbarkod"
                      rendered="#{not empty isemirHome.isemirbarkods}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="isemirbarkodsTable">
                <rich:column sortBy="#{_isemirbarkod.id}">
                    <f:facet name="header">Id</f:facet>
                    <h:outputText value="#{_isemirbarkod.id}"/>
                </rich:column>
                <rich:column sortBy="#{_isemirbarkod.barkod}">
                    <f:facet name="header">Barkod</f:facet>
                    <h:outputText value="#{_isemirbarkod.barkod}"/>
                </rich:column>
                <rich:column sortBy="#{_isemirbarkod.barkodturu}">
                    <f:facet name="header">Barkodturu</f:facet>
                    <h:outputText value="#{_isemirbarkod.barkodturu}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{isemirHome.managed}" id="isemirbarkods">
        <div class="actionButtons">
            <s:button id="addisemirbarkod"
                   value="Add isemirbarkod"
                    view="/IsemirbarkodEdit.xhtml"
             propagation="none">
                 <f:param name="isemirId"
                         value="#{isemirHome.instance.id}"/>
                 <f:param name="isemirbarkodFrom" value="Isemir"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Isemiretuts">
        <h:form styleClass="association" id="isemiretutsChildren">

            <h:outputText value="There are no isemiretuts associated with this isemir."
                       rendered="#{empty isemirHome.isemiretuts}"/>

            <rich:dataTable value="#{isemirHome.isemiretuts}"
                           var="_isemiretut"
                      rendered="#{not empty isemirHome.isemiretuts}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="isemiretutsTable">
            <rich:column sortBy="#{_isemiretut.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_isemiretut.id}"/>
            </rich:column>
            <rich:column sortBy="#{_isemiretut.tur}">
                <f:facet name="header">Tur</f:facet>
                <h:outputText value="#{_isemiretut.tur}"/>
            </rich:column>            
            <rich:column sortBy="#{_isemiretut.islemno}">
                <f:facet name="header">Islemno</f:facet>
                <h:outputText value="#{_isemiretut.islemno}"/>
            </rich:column>
			<rich:column sortBy="#{_isemiretut.urun.adi}">
                <f:facet name="header">Islemno</f:facet>
                <h:outputText value="#{_isemiretut.urun.adi} (#{_isemiretut.urun.kalip.kod} - #{_isemiretut.urun.ambalaj})"/>
            </rich:column>
            <rich:column sortBy="#{_isemiretut.kalipeki}">
                <f:facet name="header">Kalipeki</f:facet>
                <h:outputText value="#{_isemiretut.kalipeki}"/>
            </rich:column>
            <rich:column sortBy="#{_isemiretut.uruniciadet}">
                <f:facet name="header">Uruniciadet</f:facet>
                <h:outputText value="#{_isemiretut.uruniciadet}"/>
            </rich:column>            
            <rich:column sortBy="#{_isemiretut.kirik}">
                <f:facet name="header">Kirik</f:facet>
                <h:outputText value="#{_isemiretut.kirik}"/>
            </rich:column>
            <rich:column sortBy="#{_isemiretut.planfiyat}">
                <f:facet name="header">Planfiyat</f:facet>
                <h:outputText value="#{_isemiretut.planfiyat}"/>
            </rich:column>
            
            <rich:column sortBy="#{_isemiretut.parabirim.id}">
                <f:facet name="header">Para Birim</f:facet>
                <h:outputText value="#{_isemiretut.parabirim.kisaad} - #{_isemiretut.parabirim.ad}"/>
            </rich:column>

            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{isemirHome.managed}" id="isemiretuts">
        <div class="actionButtons">
            <s:button id="addisemiretut"
                   value="Add isemiretut"
                    view="/IsemiretutEdit.xhtml"
             propagation="none">
                 <f:param name="isemirId"
                         value="#{isemirHome.instance.id}"/>
                 <f:param name="isemiretutFrom" value="Isemir"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Isemirharekets for isemirid" rendered="#{authenticator.isAdmin()}">
        <h:form styleClass="association" id="isemirhareketsForIsemiridChildren">

            <h:outputText value="There are no isemirhareketsForIsemirid associated with this isemir."
                       rendered="#{empty isemirHome.isemirhareketsForIsemirid}"/>

            <rich:dataTable value="#{isemirHome.isemirhareketsForIsemirid}"
                           var="_isemirhareket"
                      rendered="#{not empty isemirHome.isemirhareketsForIsemirid}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="isemirhareketsForIsemiridTable">
                <rich:column sortBy="#{_isemirhareket.id}">
                    <f:facet name="header">Id</f:facet>
                    <h:outputText value="#{_isemirhareket.id}"/>
                </rich:column>
                <rich:column sortBy="#{_isemirhareket.miktar}">
                    <f:facet name="header">Miktar</f:facet>
                    <h:outputText value="#{_isemirhareket.miktar}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{isemirHome.managed}" id="isemirhareketsForIsemirid">
        <div class="actionButtons">
            <s:button id="addisemirhareket"
                   value="Add isemirhareket"
                    view="/IsemirhareketEdit.xhtml"
             propagation="none">
                 <f:param name="isemirId"
                         value="#{isemirHome.instance.id}"/>
                 <f:param name="isemirhareketFrom" value="Isemir"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Isemirharekets for virmanisemirid" rendered="#{authenticator.isAdmin()}">
        <h:form styleClass="association" id="isemirhareketsForVirmanisemiridChildren">

            <h:outputText value="There are no isemirhareketsForVirmanisemirid associated with this isemir."
                       rendered="#{empty isemirHome.isemirhareketsForVirmanisemirid}"/>

            <rich:dataTable value="#{isemirHome.isemirhareketsForVirmanisemirid}"
                           var="_isemirhareket"
                      rendered="#{not empty isemirHome.isemirhareketsForVirmanisemirid}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="isemirhareketsForVirmanisemiridTable">
                <rich:column sortBy="#{_isemirhareket.id}">
                    <f:facet name="header">Id</f:facet>
                    <h:outputText value="#{_isemirhareket.id}"/>
                </rich:column>
                <rich:column sortBy="#{_isemirhareket.miktar}">
                    <f:facet name="header">Miktar</f:facet>
                    <h:outputText value="#{_isemirhareket.miktar}"/>
                </rich:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{isemirHome.managed}" id="isemirhareketsForVirmanisemirid">
        <div class="actionButtons">
            <s:button id="addisemirhareket"
                   value="Add isemirhareket"
                    view="/IsemirhareketEdit.xhtml"
             propagation="none">
                 <f:param name="isemirId"
                         value="#{isemirHome.instance.id}"/>
                 <f:param name="isemirhareketFrom" value="Isemir"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Isemiruruns">
        <h:form styleClass="association" id="isemirurunsChildren">

            <h:outputText value="There are no isemiruruns associated with this isemir."
                       rendered="#{empty isemirHome.isemiruruns}"/>

            <rich:dataTable value="#{isemirHome.isemiruruns}"
                           var="_isemirurun"
                      rendered="#{not empty isemirHome.isemiruruns}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="isemirurunsTable">
            <rich:column sortBy="#{_isemirurun.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_isemirurun.id}"/>
            </rich:column>
			<rich:column sortBy="#{_isemirurun.toplammiktar}">
                <f:facet name="header">Ürün</f:facet>
                <h:outputText value="#{_isemirurun.urun.urunno} - #{_isemirurun.urun.adi}  #{_isemirurun.urun.ambalaj}"/>
            </rich:column>
            <rich:column sortBy="#{_isemirurun.toplammiktar}">
                <f:facet name="header">Toplam Miktar</f:facet>
                <h:outputText value="#{_isemirurun.toplammiktar}"/>
            </rich:column>
            <rich:column sortBy="#{_isemirurun.miktar}">
                <f:facet name="header">Bir Üründeki Miktar</f:facet>
                <h:outputText value="#{_isemirurun.miktar}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectisemirurun"
                     value="Select"
                      view="/Isemirurun.xhtml">
                    <f:param name="isemirurunId"
                            value="#{_isemirurun.id}"/>
                    <f:param name="isemirurunFrom" value="Isemir"/>
                </s:link>
            </h:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{isemirHome.managed}" id="isemiruruns">
        <div class="actionButtons">
            <s:button id="addisemirurun"
                   value="Add isemirurun"
                    view="/IsemirurunEdit.xhtml"
             propagation="none">
                 <f:param name="isemirId"
                         value="#{isemirHome.instance.id}"/>
                 <f:param name="isemirurunFrom" value="Isemir"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>
    
    <rich:tab label="Isemirmalzemes">
        <h:form styleClass="association" id="isemirmalzemesChildren">

            <h:outputText value="There are no isemirmalzemes associated with this isemir."
                       rendered="#{empty isemirHome.isemirmalzemes}"/>

            <rich:dataTable value="#{isemirHome.isemirmalzemes}"
                           var="_isemirmalzeme"
                      rendered="#{not empty isemirHome.isemirmalzemes}"
                    rowClasses="rvgRowOne,rvgRowTwo"
                            id="isemirmalzemesTable">
            <rich:column sortBy="#{_isemirmalzeme.id}">
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_isemirmalzeme.id}"/>
            </rich:column>
            <rich:column sortBy="#{_isemirmalzeme.malzeme.kod}">
                <f:facet name="header">Malzeme</f:facet>
                <h:outputText value="#{_isemirmalzeme.malzeme.kod} - #{_isemirmalzeme.malzeme.ad}"/>
            </rich:column>
            <rich:column sortBy="#{_isemirmalzeme.makskullanimmiktari}">
                <f:facet name="header">Max.Kul.Miktarı</f:facet>
                <h:outputText value="#{_isemirmalzeme.makskullanimmiktari}"/>
            </rich:column>
            <rich:column sortBy="#{_isemirmalzeme.miktar}">
                <f:facet name="header">Bir Üründeki Miktar</f:facet>
                <h:outputText value="#{_isemirmalzeme.miktar}"/>
            </rich:column>
            <h:column>
                <f:facet name="header">Action</f:facet>
                <s:link id="selectisemirmalzeme"
                     value="Select"
                      view="/Isemirmalzeme.xhtml">
                    <f:param name="isemirmalzemeId"
                            value="#{_isemirmalzeme.id}"/>
                    <f:param name="isemirmalzemeFrom" value="Isemir"/>
                </s:link>
            </h:column>
            </rich:dataTable>

        </h:form>

        <f:subview rendered="#{isemirHome.managed}" id="isemirmalzemes">
        <div class="actionButtons">
            <s:button id="addisemirmalzeme"
                   value="Add isemirmalzeme"
                    view="/IsemirmalzemeEdit.xhtml"
             propagation="none">
                 <f:param name="isemirId"
                         value="#{isemirHome.instance.id}"/>
                 <f:param name="isemirmalzemeFrom" value="Isemir"/>
            </s:button>
        </div>
        </f:subview>
    </rich:tab>

    <rich:tab label="Urun *" labelClass="required" rendered="#{authenticator.isAdmin()}">
    <div class="association" id="urunParent">

        <h:outputText value="There is no urun associated with this isemir."
                   rendered="#{isemirHome.instance.urun == null}"/>

        <rich:dataTable var="_urun"
                   value="#{isemirHome.instance.urun}"
                rendered="#{isemirHome.instance.urun != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="urunTable">
            <h:column>
                <f:facet name="header">Id</f:facet>
                <h:outputText value="#{_urun.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Adi</f:facet>
                <h:outputText value="#{_urun.adi}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Ambalaj</f:facet>
                <h:outputText value="#{_urun.ambalaj}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Barkod</f:facet>
                <h:outputText value="#{_urun.barkod}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Firma id</f:facet>
                <h:outputText value="#{_urun.firma.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Kalip id</f:facet>
                <h:outputText value="#{_urun.kalip.id}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Paletadedi</f:facet>
                <h:outputText value="#{_urun.paletadedi}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Upc</f:facet>
                <h:outputText value="#{_urun.upc}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Urunno</f:facet>
                <h:outputText value="#{_urun.urunno}"/>
            </h:column>
        </rich:dataTable>

        <div class="actionButtons">
            <s:button id="#{isemirHome.instance.urun != null ? 'changeParent_5' : 'selectParent_5'}" value="#{isemirHome.instance.urun != null ? 'Change' : 'Select'} urun"
                       view="/UrunList.xhtml">
                <f:param name="from" value="IsemirEdit"/>
            </s:button>
        </div>

    </div>
    </rich:tab>
</rich:tabPanel>
	
	 <rich:modalPanel id="popup" width="520" height="500" resizeable="false" onmaskclick="#{rich:component('popup')}.hide()">
        <f:facet name="header">
            <h:panelGroup>
                <h:outputText value="Ürün Seçimi"></h:outputText>
            </h:panelGroup>
        </f:facet>
        <f:facet name="controls">
            <h:panelGroup>
                <h:graphicImage value="/img/close.png" styleClass="hidelink" id="hidelink"/>
                <rich:componentControl for="popup" attachTo="hidelink" operation="hide" event="onclick"/>
            </h:panelGroup>
        </f:facet>
		
        <h:panelGrid id="seciliUrunBilgisi">
	        <s:decorate id="kalipekiField" template="layout/edit.xhtml">
	            <ui:define name="label">Seçili Ürün</ui:define>
	            <h:outputLabel value="#{isemirHome.instance.urun.adi} - #{isemirHome.instance.urun.ambalaj}"/>
	        </s:decorate>
        </h:panelGrid>        
       
        <a:form reRender="seciliUrunBilgisi">
	        <h:panelGrid>
		        	<rich:extendedDataTable rows="10" value="#{isemirHome.urunsDataModel}" var="urun" id="table" width="500px" height="350px"
		        		sortMode="#{isemirHome.sortMode}" selectionMode="#{isemirHome.selectionMode}" 
		        		tableState="#{isemirHome.tableState}" selection="#{isemirHome.selection}">
		        	   	<a:support event="onselectionchange" reRender="seciliUrunBilgisi,extendedDataTableField" action="#{isemirHome.takeSelection()}"/>
		               	<rich:column sortable="true" sortBy="#{urun.urunno}" id="col_2" 
		               		filterBy="#{urun.urunno}" filterEvent="onkeyup" width="170px" label="Ürün No">
		                   	<f:facet name="header">
		                    	<h:outputText value="Ürün No" id="state_name"/>
		                   	</f:facet>
		                   	<h:outputText value="#{urun.urunno}" id="cap_state"/>
		               	</rich:column>
		               	<rich:column sortable="true" sortBy="#{urun.adi}" id="col_3" 
		               		filterBy="#{urun.adi}" filterEvent="onkeyup" width="330px" label="Ürün Adı">
		                   	<f:facet name="header">
		                    	<h:outputText value="Ürün Adı" id="state_capital"/>
		                   	</f:facet>
		                   	<h:outputText value="#{urun.adi} - #{urun.ambalaj}" id="cap_name"/>
		               	</rich:column>		               	
		           	</rich:extendedDataTable>
	           <rich:datascroller for="table" maxPages="5"/>
	        </h:panelGrid>
	        
	        <h:panelGrid columns="2" style="margin-left: 37%;" >
	        	<a:commandButton value="Tamam" style=" width : 60px;" action="#{isemirHome.takeSelection()}" reRender="seciliUrunBilgisi,extendedDataTableField,save,update" onclick="#{rich:component('popup')}.hide()"/>
	        	<a:commandButton value="İptal" style=" width : 60px;" action="#{isemirHome.clearSelectedUrun()}" reRender="seciliUrunBilgisi,extendedDataTableField,save,update" onclick="#{rich:component('popup')}.hide()" />
	        </h:panelGrid>
		</a:form>
    </rich:modalPanel>

</ui:define>

</ui:composition>
